import java.util.Scanner;

public class myOrderApp {
    public enum Drink {
        COLA(10),XUEBI(10),SHASHI(7),WATER(5);
        public int price = 0;
        //
        Drink(int price) {
            this.price = price;
        }
        public int getPrice() {
            return price;
        }
    }

    public static void main(String[] args) {
        System.out.println("这是菜单");
        for(Drink drink : Drink.values()) {
            System.out.println("-" + drink.name() + "$ " + drink.getPrice());
        }
        System.out.println("请选择您要喝的饮料");
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next().toUpperCase();
        //可能输入错误
        try {
            Drink select = Drink.valueOf(input);
            System.out.println("您选择的饮料是" + select.name() + "价格是" + select.getPrice());
        }catch (Exception e) {
            System.out.println("您输入的饮料有误");
        }
        //scanner.close();
    }
}
